package com.mfrs;

import android.os.Parcel;
import android.os.Parcelable;

public final class ActionResult implements Parcelable
{
	public static final int CODE_Success = 0;
	public static final int CODE_LicenseNotValid = -1;
	public static final int CODE_LicenseExpired = -2;
	public static final int CODE_FaceNotFound = -11;
	public static final int CODE_ImageFormatNotSupport = -12;
	public static final int CODE_FRSEngineError = -13;
	public static final int CODE_InputOutputError = -14;
	public static final int CODE_InvalidFeatureData1 = -21;
	public static final int CODE_InvalidFeatureData2 = -22;
	public static final int CODE_InvalidFaceDetectionParam = -33;
	public static final int CODE_UnknownError = -101;
	
	 
	
	private int code;
	private String remark;
		
	public static final Creator<ActionResult> CREATOR = new Creator<ActionResult>() {

		@Override
		public ActionResult createFromParcel(Parcel in) {
			return new ActionResult(in);		
			}

		@Override
		public ActionResult[] newArray(int size) {
			return new ActionResult[size];
		}		
	};
	
	public ActionResult()
	{
		
	}
	
	public ActionResult(Parcel in){
		readFromParcel(in);
	}
	
    public void readFromParcel(Parcel in) {
    	code = in.readInt();
    	remark = in.readString();
    }
    
    
	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel outParcel, int flags) {

		outParcel.writeInt(code);
	    outParcel.writeString(remark);
	}	
	
	public static Creator<ActionResult> getCreator() {
		return CREATOR;
	}

	public int getCode() {
		return code;
	}

	protected void setCode(int code) {
		this.code = code;
	}

	public String getRemark() {
		return remark;
	}

	protected void setRemark(String remark) {
		this.remark = remark;
	}
	
	
	

}